<template>
  <XyHome />
</template>

<script lang="ts">
import XyHome from '@comps/XyHome.vue'
import Method from './globalmethods.ts'
import { ElMessage } from 'element-plus'
export default {
  name: 'App',
  components: { XyHome },
  data() {
    return {
      isInitialized: true,
    }
  },
  mounted() {
    //数据加载完成后才显示XyHome
    let elmsg = ElMessage({
      message: '页面资源加载中...',
      type: 'info',
      duration: 0, // 不自动关闭
    })

    Method.getInformation((ok: boolean) => {
      if (ok) {
        ElMessage({
          message: '加载完成',
          type: 'success',
        })
      } else {
        ElMessage({
          message: '社区连接失败，请按 F5 刷新重试',
          type: 'error',
        })
      }
      elmsg.close()
    })
  },
}
</script>
<style scoped>
.el-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style>
